<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<link rel="stylesheet" href="mystyle.css">
<title>WorkFlow Management</title>
<script language="JavaScript" type="text/javascript">
function doValidation() {
	 var username = document.getElementById("username").value;
	 var password = document.getElementById("password").value;	 
	 if (username==""||password=="")
		{
		alert("All fields are mandatory!! Please enter appropriately!");
		return false;
		}
	 return true;
}
</script>
</head>
 
<body>

<s:if test="hasActionErrors()">
   <div class="errors">
      <s:actionerror/>
   </div>
</s:if>
<s:form action="login">

<table align="center">
<tr><b><h1 align="center"><b>WorkFlow management portal</b></h1></b></tr>
<tr>
<td><img src="images/login.jpg" width="200" height="100"/></td>
<td><table id="text">
    <td><s:textfield name="username" label = "User ID" id="myinput" size="20" /></td>
    <td><s:password name="password" label="Password" id="myinput" size="20" /></td>
    </tr>
</table></td>
</table>    
<table border="0"><tr></tr><tr><td> </td>
<td>
<s:url id="register" action="register_user">
</s:url> 
<h3><s:a href="%{register}">Register as New User</s:a></h3>
</td>
</tr></table>
    <s:submit name = "commandButton" id="mysubmit" value="Login!" align="center" />
</s:form>
</body>
</html>
